/**
 * common
 */
class Common {
	constructor() {

	}
	init() {
		fcUtil.setIcon();
		//指定默认
		if (/workshop$/.test(location.href)) {
			//指定默认
			this.pjaxInit('/workshop?key=home');
		} else {
			this.pjaxInit(location.href.replace(location.origin, ''));
		}
		fcUtil.setMenuSelect();
		Breakpoints();
	}
	pjaxInit(url) {
		u.log('-pjaxInit-')
		fcUtil.updataAuthority();
		if (!url) {
			alertify.error('该功能暂未开放!');
			return false;
		}
		//加载中动画
		fcUtil.loading();
		//--------------
		$.pjax({
			url: url,
			container: '#wd-pageContent',
			type: "POST"
		});
	}
};
(() => {
	let common = new Common();
	common.init();
	window.pjaxInit = common.pjaxInit;
})();